﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FileSystemLinqProviderConsoleApp
{
    public enum ElementType
    {
        File,
        Folder
    }

    public abstract class FileSystemElement
    {
        public string Path { get; private set; }
        public abstract ElementType ElementType { get; }

        protected FileSystemElement(string path)
        {
            Path = path;
        }
    }

    public class FolderElement : FileSystemElement
    {
        public FolderElement(string folderName) : base(folderName)
        {
        }

        public override ElementType ElementType
        {
            get { return ElementType.Folder; }
        }
    }

    public class FileElement : FileSystemElement
    {
        public FileElement(string fileName)
            : base(fileName)
        {
        }

        public override ElementType ElementType
        {
            get { return ElementType.File; }
        }
    }
}
